7.5
HIGH CVSS 3.1
CVE-2022-24785
Moment.js Path Traversal Vulnerability in npm Server
Description

Moment.js is a JavaScript date library for parsing, validating, manipulating, and formatting dates. A path traversal vulnerability impacts npm (server) users of Moment.js between versions 1.0.1 and 2.29.1, especially if a user-provided locale string is directly used to switch moment locale. This problem is patched in 2.29.2, and the patch can be applied to all affected versions. As a workaround, sanitize the user-provided locale name before passing it to Moment.js.

INFO

Published Date :

April 4, 2022, 5:15 p.m.

Last Modified :

Nov. 21, 2024, 6:51 a.m.

Remotely Exploit :

Yes !
Affected Products

The following products are affected by CVE-2022-24785 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Fedoraproject fedora
1 Debian debian_linux
1 Tenable tenable.sc
1 Netapp active_iq
1 Momentjs moment
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 2.0 MEDIUM [email protected]
CVSS 3.1 HIGH [email protected]
CVSS 3.1 HIGH [email protected]
Solution
This vulnerability can be addressed by updating Moment.js and sanitizing user-provided locale names.
  • Update affected Moment.js packages to version 2.29.2 or later.
  • Sanitize user-provided locale names before use.
Public PoC/Exploit Available at Github

CVE-2022-24785 has a 6 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-24785.

URL Resource
https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 Patch
https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 Vendor Advisory
https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
https://security.netapp.com/advisory/ntap-20220513-0006/ Third Party Advisory
https://www.tenable.com/security/tns-2022-09 Patch Release Notes Third Party Advisory
https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 Patch
https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 Vendor Advisory
https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
https://security.netapp.com/advisory/ntap-20220513-0006/ Third Party Advisory
https://www.tenable.com/security/tns-2022-09 Patch Release Notes Third Party Advisory
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-24785 is associated with the following CWEs:

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

A command line tool and simple web app to resolve project dependencies from 'requirements.txt' or 'package.json' and identify known vulnerabilities (CVEs) by querying OSV.dev API and flag unmaintained packages.

Python HTML

Updated: 5 hours, 46 minutes ago
0 stars 0 fork 0 watcher
Born at : Aug. 25, 2025, 5:31 a.m. This repo has been linked 15 different CVEs too.

취약한 이미지 파일 분석용으로 작성

JavaScript

Updated: 2 months, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : May 29, 2025, 8:27 a.m. This repo has been linked 4 different CVEs too.

None

HTML Python Shell

Updated: 1 month, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : Feb. 13, 2025, 8:50 a.m. This repo has been linked 891 different CVEs too.

testing webhooks

Shell HTML CSS JavaScript

Updated: 1 month, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : Jan. 15, 2025, 8:33 p.m. This repo has been linked 10 different CVEs too.

Moment.js vuln lab

JavaScript CSS HTML

Updated: 1 month, 1 week ago
1 stars 0 fork 0 watcher
Born at : May 29, 2023, 11:40 p.m. This repo has been linked 1 different CVEs too.

None

Updated: 2 months, 3 weeks ago
1 stars 0 fork 0 watcher
Born at : April 13, 2023, 7:02 a.m. This repo has been linked 20 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-24785 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-24785 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • CVE Modified by af854a3a-2127-422b-91ae-364da2661108

    Nov. 21, 2024

    Action Type Old Value New Value
    Added Reference https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5
    Added Reference https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4
    Added Reference https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html
    Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
    Added Reference https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
    Added Reference https://security.netapp.com/advisory/ntap-20220513-0006/
    Added Reference https://www.tenable.com/security/tns-2022-09
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/ [No types assigned]
    Added Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/ [No types assigned]
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/
    Removed Reference GitHub, Inc. https://lists.fedoraproject.org/archives/list/[email protected]/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/
  • Modified Analysis by [email protected]

    Feb. 16, 2023

    Action Type Old Value New Value
    Changed Reference Type https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 Patch, Third Party Advisory https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 Patch
    Changed Reference Type https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 Third Party Advisory https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 Vendor Advisory
    Changed Reference Type https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html No Types Assigned https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html Mailing List, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Jan. 31, 2023

    Action Type Old Value New Value
    Added Reference https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html [No Types Assigned]
  • Modified Analysis by [email protected]

    Jul. 30, 2022

    Action Type Old Value New Value
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/ Mailing List, Third Party Advisory
    Changed Reference Type https://lists.fedoraproject.org/archives/list/[email protected]/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/ No Types Assigned https://lists.fedoraproject.org/archives/list/[email protected]/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/ Mailing List, Third Party Advisory
    Changed Reference Type https://security.netapp.com/advisory/ntap-20220513-0006/ No Types Assigned https://security.netapp.com/advisory/ntap-20220513-0006/ Third Party Advisory
    Changed Reference Type https://www.tenable.com/security/tns-2022-09 No Types Assigned https://www.tenable.com/security/tns-2022-09 Patch, Release Notes, Third Party Advisory
    Added CPE Configuration OR *cpe:2.3:a:tenable:tenable.sc:*:*:*:*:*:*:*:* versions up to (excluding) 5.21.0
    Added CPE Configuration OR *cpe:2.3:a:netapp:active_iq:-:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* *cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Jul. 23, 2022

    Action Type Old Value New Value
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/ [No Types Assigned]
    Added Reference https://lists.fedoraproject.org/archives/list/[email protected]/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/ [No Types Assigned]
  • CVE Modified by [email protected]

    May. 13, 2022

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20220513-0006/ [No Types Assigned]
  • CVE Modified by [email protected]

    Apr. 20, 2022

    Action Type Old Value New Value
    Added Reference https://www.tenable.com/security/tns-2022-09 [No Types Assigned]
  • Initial Analysis by [email protected]

    Apr. 12, 2022

    Action Type Old Value New Value
    Added CVSS V2 NIST (AV:N/AC:L/Au:N/C:N/I:P/A:N)
    Added CVSS V3.1 NIST AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
    Changed Reference Type https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 No Types Assigned https://github.com/moment/moment/commit/4211bfc8f15746be4019bba557e29a7ba83d54c5 Patch, Third Party Advisory
    Changed Reference Type https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 No Types Assigned https://github.com/moment/moment/security/advisories/GHSA-8hfj-j24r-96c4 Third Party Advisory
    Added CWE NIST CWE-22
    Added CPE Configuration OR *cpe:2.3:a:momentjs:moment:*:*:*:*:*:node.js:*:* versions from (including) 1.0.1 up to (excluding) 2.29.2 *cpe:2.3:a:momentjs:moment:*:*:*:*:*:nuget:*:* versions from (including) 1.0.1 up to (excluding) 2.29.2
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 7.5
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact
Base CVSS Score: 5
Access Vector
Access Complexity
Authentication
Confidentiality Impact
Integrity Impact
Availability Impact
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

0.68 }} -0.04%

score

0.70700

percentile